package com.appleyk;

import com.appleyk.config2.ConfigA;
import com.appleyk.service.IService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * <p>越努力，越幸运</p>
 *
 * @author appleyk
 * @version V.0.1.1
 * @blob https://blog.csdn.net/appleyk
 * @date created on  7:38 下午 2020/12/9
 */
public class ImportContext {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(ConfigA.class);
        IService bean = context.getBean(IService.class);
        bean.say();
    }
}
